<?php 

/*
Template name: Archives
*/
get_header();
?>
<div id="content">

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
	<div class="post page archivepage" id="post-<?php the_ID(); ?>">

		<h2 id="pagetitle"><?php the_title(); ?></h2>		
		<div class="postcontent">
			<?php the_content(); ?>

			<h3>Category</h3>

			<ul id="archivepage">
				<?php wp_list_categories('sort_column=name&show_count=1&title_li='); ?>
			</ul>

		</div>

	</div>
<?php
	endwhile;
	else :
		echo walleve_404_message(); 
	endif;
?>

	<?php if(!(is_page() || is_single()) ){ ?>
		<div id="pagenav">
			<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>
		</div>
	<?php } ?>
</div>
<?php walleve_sidebar() ?>

<?php get_footer(); ?>